﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace clipShowConfig
{
    public partial class MediaType : Form
    {
        public MediaType()
        {
            InitializeComponent();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            txtFileTypeExtension.Text = "cancel";
            this.Close();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            if (txtFileTypeExtension.Text.StartsWith("*."))
            {
                this.Close();
            }
            else
            {
                MessageBox.Show(String.Format("'{0}' is not a valid file extension.", txtFileTypeExtension.Text), 
                    "clipShow Add Media File Type", MessageBoxButtons.OK,MessageBoxIcon.Error);
            }
        }
    }
}
